home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 43 / Amiga Format CD43 (1999)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-09].iso / -serious- / emulation / gb-diz / bonus / waitmb / waitmb.s < prev   
Text File  |  1999-06-14  |  2KB  |  87 lines

  1. ******************************************************************************
  2. *     _____________________________________________________________________  *
  3. *     \  ___   \  ____  \  ___   \    /   \    ____/___  ___   \  ________/  *
  4. *     /\/  /   /\/ __   /\/    __/\/ _  __/\___   /   /\/  /   /\/ ____/     *
  5. *    /    /   /    /   /    /   /    /   /   /   /   /    /   /    /   /     *
  6. *   /________/____/___/____/___/____/___/_______/___/________/________/      *
  7. *  .---.----(*(             wHERE gOD wENT wRONG           )*)---.---.       *
  8. *  `-./                                                           \.-'       *
  9. *                                                                            *
  10. *              WAITMB - Tool to wait for any MouseButton             *
  11. *                        by StingRay/DSD^LFC^SCL!                 *
  12. *                           v1.o - 18-Feb-99                     *
  13. *                  no rights reserved :)                         *
  14. *        fixed 21-Feb-99 6:00:59 a.m. :)                                     *
  15. ******************************************************************************
  16.  
  17. START    movem.l    d1-a6,-(a7)
  18.     move.l    $4.w,a6
  19.     moveq    #37,d0
  20.     lea    DOSname(pc),a1
  21.     jsr    -552(a6)        ; OpenLibrary()
  22.     move.l    d0,a6
  23.     tst.l    d0            ; fixed :)
  24.     beq.b    .error
  25.  
  26.     lea    Template(pc),a0
  27.     move.l    a0,d1
  28.     lea    ARG_ARRAY(pc),a0
  29.     move.l    a0,d2
  30.     moveq    #0,d3
  31.     jsr    -798(a6)        ; ReadArgs()
  32.     lea    Args(pc),a0
  33.     move.l    d0,(a0)
  34.     beq.b    .noArgs
  35.     lea    ARG_ARRAY(pc),a0
  36.     tst.l    4(a0)            ; RMB?
  37.     beq.b    .noRMB
  38.     lea    RMB(pc),a1
  39.     lea    INFO(pc),a2
  40.     move.l    a1,(a2)
  41. .noRMB    bsr.b    Print    
  42.         
  43.     tst.l    4(a0)
  44.     bne.b    .RMB
  45.     
  46. .LMB    btst    #6,$bfe001
  47.     bne.b    .LMB
  48.     bra.b    .end
  49.  
  50. .RMB    btst    #2,$dff016
  51.     bne.b    .RMB
  52.     
  53. .end    move.l    Args(pc),d0
  54.     beq.b    .noArgs
  55.     move.l    d0,d1
  56.     jsr    -858(a6)        ; FreeArgs()
  57. .noArgs    move.l    a6,a1
  58.     move.l    $4.w,a6
  59.     jsr    -414(a6)        ; CloseLibrary()
  60. .error    movem.l    (a7)+,d1-a6
  61.     rts
  62.  
  63. Print    move.l    a0,-(a7)
  64.     lea    Text(pc),a0
  65.     lea    Info(pc),a1
  66.     move.l    a0,d1
  67.     move.l    a1,d2            ; no formatting Text
  68.     jsr    -954(a6)        ; VFprintF()    
  69.     move.l    (a7)+,a0
  70.     rts
  71.  
  72. Template    dc.b    "LMB/S,RMB/S",0
  73. Args        dc.l    0
  74. ARG_ARRAY    dc.l    0,0
  75. INFO        dc.l    LMB
  76. LMB        dc.b    "LMB",0
  77. RMB        dc.b    "RMB",0
  78. DOSname        dc.b    "dos.library",0
  79. Text        dc.b    "Press %s to continue.",10,0
  80.  
  81.         dc.b    "Hi visitor :=)",10
  82.         dc.b    "This small piece was 'coded' in 5 minutes by",10
  83.         dc.b    "StingRay/DSD^LFC^SCL! :)",10
  84.         dc.b    "See you in another DSD release",10
  85.         dc.b    "Bye for now",10,0
  86.     
  87.